package com.maven.springaop.demos.proxy;


// 代理
public class ProxyHouseObject implements HouseObject{

    private HouseObject houseObject;
    public ProxyHouseObject(HouseObject houseObject) {
        this.houseObject = houseObject;
    }

    @Override
    public void rentHouse() {
        System.out.println("我是代理商，我来帮忙出租");
        houseObject.sellHouse();
        System.out.println("我是代理商，出租完毕");
    }



    @Override
    public void sellHouse() {
        System.out.println("我是代理商，我来代售");
        houseObject.sellHouse();
        System.out.println("我是代理商，代售完毕");
    }
}
